<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Referer Facebook App</title>
        <style type="text/css">          
            body {
                margin:0px;
                padding:0px;
                font-family:Arial, Helvetica, sans-serif;
                font-size:12px;
                color:#000;
            }
            p {
                line-height:16px;
                margin:0px;
                padding:0px;
            }

            h1 {
                padding:0px;
                margin-bottom:5px;
                margin-top:0px;
                font-size:14px;
            }
            a {
                color:#000;
                text-decoration:none;
            }
            a:hover {
                color:#000;
                text-decoration:underline;
            }

            img{ border:0px; background:none;}
            img a{ border:0px; background:none;}
            .w774{ width:774px;}
            .mc{ margin:0 auto;}
            .w850{ width:810px;}
            .bg_main{ background:url(<?php echo $view->config['template_url'];?>assets/img/810/bg_main.jpg) top left no-repeat #000; padding-bottom:30px;}
            .white_bg{ background:#FFFFFF; padding-bottom:20px;}
            .p30t{ padding-top:28px;}
            ul.nav{ width:624px; background:#90c07a; margin:0px; padding-left:150px; list-style:none; height:37px;}
            ul.nav li{ margin-left:0px; padding:0px; float:left; margin-right:1px;}
            ul.nav li a{ display:block; padding:11px 15px 11px 15px; font-size: 14px;font-weight: bolder;}
            ul.nav li a:hover{ background:#add19c; text-decoration:none;}
            ul.nav li a.current{background:#add19c; text-decoration:none;}
            .po{ position:relative;}
            .logo{ background:url(<?php echo $view->config['template_url'];?>assets/img/810/logo.png) top left no-repeat; width:119px; height:123px; position:absolute; top:-20px; left:20px; font-size:0px;}
            .b3px{ border:3px solid #90c07a; border-top:0px;}
            .b1px{ border:1px solid #90c07a; width:175px; margin-top:25px;}
            .b1px img{ width:173px; height:140px; overflow:hidden;}
            .green_bg{ background:#90c07a; text-align:center; padding:6px 10px 6px 10px;}
            .img_main{ width:768px; overflow:hidden;}
            .bg_vote{ background:#2a2a2a; color:#FFFFFF; text-align:center; padding:10px 10px 10px 10px; font-size:16px; position:absolute; right:1px; top:1px;}
            .w744{ width:744px;}
            .bg_btn{ background:url(<?php echo $view->config['template_url'];?>assets/img/810/bg_btn.png) top left no-repeat; width:87px; height:28px; text-align:center; padding-top:20px; margin-top:5px;}
            .bg_btn a{ font-size:15px; font-weight:bold; color:#fff}
            .bg_btn a:hover{ font-weight:lighter; text-decoration:none;}
            
            .btn_liked{
                background: url(<?php echo $view->config['template_url'];?>assets/img/810/bg_btn_liked.png) top left no-repeat;                
            }
            .btn_liked a{
                color: #D5D5D5;
            }
            
            ul.pages{ list-style:none; margin:0px; padding-left:0px; float:right; padding-right:50px;}
            ul.pages li{ float:left; margin-left:0px; padding:0px; margin-right:2px;}
            ul.pages li a{ color:#fff; display:block; padding:3px 8px 3px 8px;}
            ul.pages li a:hover{ background:#FFFFFF; color:#000000; text-decoration:none;}
            ul.pages li a.curr{ background:#FFFFFF; color:#000;}
            
            .lightbox-normal-text-size{
                font-size: 11px;
            }
            .bg_img_lightbox{
                background: url("<?php echo $view->config['template_url'];?>assets/img/810/bg_small_img.png") no-repeat scroll left top transparent;
                height: 65px;
                padding-top: 3px;
                text-align: center;
                width: 65px;
            }
            .wrap{
                margin: 0 auto;
                width: 810px;
            }
            
            .bg_trans{ background:url("<?php echo $view->config['template_url'];?>assets/img/810/bg_trans.png") top left repeat; padding:8px 0px 8px 0px; color:#fff; text-align:center;}
        </style>
         <script type="text/javascript" src="../../libs/js/jquery.min.js"></script>
        <script type="text/javascript" src="../../libs/js/jquery.blockUI.js"></script>
        <script type="text/javascript">
            jQuery.noConflict();
        </script>        

        <script type="text/javascript" src="<?php echo $view->config['template_url'];?>assets/js/webjs.js"></script>   

        <link type="text/css" rel="stylesheet" href="../../libs/lightface/Assets/LightFace.css" />
        
        <link type="text/css" rel="stylesheet" href="<?php echo $view->config['template_url'];?>assets/css/style.css" />
        
        <script type="text/javascript" src="../../libs/js/mootools-1.3.js"></script>

        <script type="text/javascript" src="../../libs/lightface/tests/mootools-more-drag.js"></script>
        <script type="text/javascript" src="../../libs/lightface/Source/LightFace.js"></script>
        <script type="text/javascript" src="../../libs/lightface/Source/LightFace.Request.js"></script>
        <script type="text/javascript" src="../../libs/lightface/Source/LightFace.Static.js"></script>
        <script type="text/javascript" src="../../libs/lightface/Source/LightFace.IFrame.js"></script>
        <script type="text/javascript" src="../../libs/lightface/Source/LightFace.Image.js"></script>

        <!-- start loading private library -->
        <script type="text/javascript" src="<?php echo $view->config['template_url'];?>assets/js/facebooktab.js"></script>
        
        <!-- for friend selectors -->  
        <link rel="stylesheet" href="../../libs/js/fbfriendselector/jquery.facebook.multifriend.select.css" /> 
    </head>
    <body>                    
        <script src="http://connect.facebook.net/en_US/all.js"></script>
        <div id="fb-root"></div>
        <script type="text/javascript" charset="utf-8">            
            FB.init({
                appId  : '<?php echo $view->config['facebook_app_id']; ?>',
                status : true, // check login status
                cookie : true, // enable cookies to allow the server to access the session
                xfbml  : true, // parse XFBML               
                oauth  : true // enable OAuth 2.0
            });         
        </script>
        
        <!-- set up the javascript variables --> 
        
        <script type="text/javascript">
            <?php if ($view->isConnectedFacebook) { ?>
                webjs.isConnectedFacebook = true;
            <?php } ?>
            // set up for lightbox
            facebooktab.lightboxPaddingTop = 180;
            facebooktab.lightboxAutoAdjust = false;
            
        </script>
        
        <div class="w850 mc bg_main p30t">
            <div class="w774 mc white_bg">
                
                <ul class="nav po" style="padding-left: 0;width: 774px;">                                        
                    
                    <li><a href="?action=index" <?php if($view->action == "index"){?>class="curr1"<?php } ?>>Home</a></li>
                    <li><a href="?action=about" <?php if($view->action == "about"){?>class="curr1"<?php } ?>>About us</a></li>
                    <?php if($view->isLogined) { ?>
                        <li style="float:right;"><a href="?action=logout" <?php if($view->action == "logout"){?>class="curr1"<?php } ?>>Logout</a></li>
                    <?php } ?>
                    
                </ul>
                <div style="clear:both"></div>            
                <div class="w744 mc">
                
                    <!-- start main content -->

                        <?php echo $view->view_content; ?>

                    <!-- end of main content -->
                    
                    <div style="float:right;padding: 10px;margin-top: -5px;font-size: 8pt;color:black;">
                        <a style="color:#000; margin-right: 10px;" href="javascript:webjs.showTOSWindow();">TOS</a> 
                        <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($view->config['facebooktab_share_url']); ?>&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:20px;vertical-align: middle;" allowTransparency="true"></iframe>
                    </div>
                    <br/>
                    
                </div>
            </div>        
            
            <div style="clear:both"></div>
        </div>                
        
        <script type="text/javascript" src="http://apis.google.com/js/plusone.js">
            {lang: 'no'}
        </script>    
        <script type="text/javascript" charset="utf-8">
            FB.Canvas.setSize({ width: 810, height: 1000 });
        </script>
        <script type="text/javascript">  
            
            document.id(document.body).addEvent('click',facebooktab.likecloser);        
            
        </script>
        <br/>
    </body>    
</html>